import { lazy, Suspense } from "react";

// 传入一个url,加载组件
function LazyLoad(url) {
  const Element = lazy(()=>import('./'+url))
  return ( <Suspense><Element/></Suspense> );
}

export default LazyLoad;